import pymysql


def main():
    con = pymysql.connect(user="root", host="localhost", passwd="as", database="dxys")

    cursor = con.cursor()

    pro_sql = """
        CREATE TABLE IF NOT EXISTS province_info(
        localtion VARCHAR(100) comment '省份',
        currentConfirmedCount INT comment '现存确诊',
        confirmedCount INT comment '累计确诊',
        deadCount INT COMMENT '死亡',
        curedCount INT comment '治愈'
        ) comment '国内各省疫情信息';
    """
    
    city_sql = """
        CREATE TABLE IF NOT EXISTS city_info(
        localtion VARCHAR(100) comment '城市',
        currentConfirmedCount INT comment '现存确诊',
        confirmedCount INT comment '累计确诊',
        deadCount INT COMMENT '死亡',
        curedCount INT comment '治愈'
        ) comment '国内各市疫情信息';
    """

    cursor.execute(pro_sql)
    cursor.execute(city_sql)
    cursor.close()
    con.close()